<template>
  <div class="wrap">
    <header>
      <div class="header-top">
        <img src="../../../static/img/zuojiantou.png" alt="" @click="back">
        美食
      </div>
      <div class="search" @click="jump('search')">
        <img src="../../../static/img/sousuo1.png" alt="">
        <span>请输入搜索商品名称</span>
      </div>
    </header>
    <section>
      <div class="secHead">
          <span>精选美食</span>
          <p @click="jump('panicBuy')"><span>更多</span><img src="../../../static/img/xiaozuo.png" alt=""></p>
      </div>
      <div class="box" @click="jump('panicDetails')">
          <div class="boxHead">
            <img src="../../../static/img/meishi_1.png" alt="">
            <img src="../../../static/img/jingpin1.png" alt="">
          </div>
          <div class="boxInfo">
              <div class="infoLeft">
                <img src="../../../static/img/redu1.png" alt="">
                <p class="infoName">精品海鲜套餐大排档</p>
                <p class="infoDetails">高温环保烹饪，绿色蔬菜搭配 为您提供美味享受</p>
              </div>
              <div class="infoRight">立即抢购</div>
          </div>
        <div class="weizhi">
          <img src="../../../static/img/dingwei_1.png" alt="">
          <span>寿司故事，皇后街125号</span>
        </div>
      </div >
      <div class="box" @click="jump('panicDetails')">
          <div class="boxHead">
            <img src="../../../static/img/meishi_2.png" alt="">
            <img src="../../../static/img/jingpin1.png" alt="">
          </div>
          <div class="boxInfo">
              <div class="infoLeft">
                <img src="../../../static/img/redu1.png" alt="">
                <p class="infoName">麦当劳汉堡全家桶</p>
                <p class="infoDetails">高温环保烹饪，绿色蔬菜搭配 为您提供美味享受</p>
              </div>
              <div class="infoRight">立即抢购</div>
          </div>
          <div class="weizhi">
            <img src="../../../static/img/dingwei_1.png" alt="">
            <span>寿司故事，皇后街125号</span>
          </div>
      </div>
    </section>
  </div>
</template>

<script>
  export default {
    name: "deliciousFood",
    methods: {
      back() {
        this.$router.back();
      },
      jump(page){
        this.$router.push({
          name:page
        })
      }
    }
  }
</script>

<style scoped>
  .wrap {
    width: 100%;
    box-sizing: border-box;
    min-height: 6.67rem;
    padding-top: .91rem;
  }

  header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    background: linear-gradient(-90deg, rgba(255, 142, 65, 1), rgba(255, 110, 0, 1));
    padding-bottom: .1rem;
  }

  .header-top {
    width: 100%;
    height: .5rem;
    color: #ffffff;
    font-size: .18rem;
    font-family: PingFang SC;
    font-weight: 500;
    line-height: .5rem;
    text-align: center;
    position: relative;
    display: flex;
    flex-flow: row;
    align-items: center;
    justify-content: center;
  }

  .header-top > img {
    width: .1rem;
    height: .17rem;
    position: absolute;
    left: .1rem;
  }

  .search {
    width: 3.35rem;
    height: .31rem;
    margin: 0 auto;
    background: rgba(238, 238, 238, .5);
    border-radius: .16rem;
    line-height: .31rem;
    color: rgba(255,255,255,.5);
    font-size: .12rem;
    font-family: PingFang SC;
    font-weight: 400;
    display: flex;
    flex-flow: row;
    align-items: center;
    box-sizing: border-box;
    padding-left: .1rem;
  }

  .search > img {
    width: .16rem;
    height: .16rem;
    margin-right: .1rem;
  }
  section {
    width: 100%;
    box-sizing: border-box;
    padding: .1rem;
  }
  .secHead {
    width: 100%;
    height: .3rem;
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    align-items: center;
  }
  .secHead>span:nth-child(1) {
    font-size:.18rem;
    font-family:PingFang SC;
    font-weight:500;
    color: #000000;
  }
  .secHead>p:nth-child(2){
    display: flex;
    flex-flow: row;
    align-items: center;
  }
  .secHead>p:nth-child(2)>span {
    font-size:.12rem;
    font-family:PingFang SC;
    font-weight:500;
    color: #B5B5B5;
  }
  .secHead>p:nth-child(2)>img {
    width: .05rem;
    height: .08rem;
    margin-left: .05rem;
  }

  .box {
    margin: .1rem auto;
    background:rgba(255,255,255,1);
    box-shadow:0 .04rem .05rem 0 rgba(0, 0, 0, 0.51);
    border-radius:.05rem;
  }
  .boxHead {
    width: 100%;
    height: 1.31rem;
    position: relative;
  }
  .boxHead>img:nth-child(1) {
    width: 100%;
    height: 100%;
  }
  .boxHead>img:nth-child(2) {
    width: .29rem;
    height: .67rem;
    position: absolute;
    right: .17rem;
    bottom: -.22rem;
  }
  .boxInfo {
    width: 100%;
    box-sizing: border-box;
    padding: .15rem .15rem 0;
    display: flex;
    flex-flow: row;
    align-items: center;
    justify-content: space-between;
  }
  .infoLeft {
    max-width: 2rem;
  }
  .infoLeft>img {
    width: .83rem;
    height: .15rem;
    margin-bottom: .05rem;
  }
  .infoName {
    color: #222222;
    font-size:.18rem;
    font-family:PingFang SC;
    font-weight:500;
    line-height: .2rem;
    margin-bottom: .05rem;
  }
  .infoDetails {
    max-width: 1.8rem;
    color: #999999;
    font-size:.1rem;
    line-height: .18rem;
    font-family:PingFang SC;
    font-weight:400;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .infoRight {
    width:1.01rem;
    height:.32rem;
    background:linear-gradient(-90deg,rgba(253,133,0,1) 0%,rgba(252,169,0,1) 100%);
    box-shadow:0 .03rem .11rem 0 rgba(255,12,70,0.14);
    border-radius:.16rem;
    font-size:.14rem;
    font-family:Adobe Heiti Std;
    font-weight:normal;
    color: #ffffff;
    text-align: center;
    line-height: .32rem;
  }

  .weizhi {
    width: 100%;
    height: .3rem;
    box-sizing: border-box;
    padding: 0 .15rem;
    display: flex;
    flex-flow: row;
    align-items: center;
  }
  .weizhi>img {
    width: .07rem;
    height: .1rem;
    margin-right: .05rem;
  }
  .weizhi>span {
    font-size:.08rem;
    font-family:Adobe Heiti Std;
    font-weight:normal;
    color: #90A4AE;
  }
</style>
